﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.Composition;
using Caliburn.Micro;

namespace CitiSurface {
    [Export(typeof(IShell))]
    public class ShellViewModel : PropertyChangedBase, IShell
    {
        private readonly ObservableCollection<MainBarAlbum> _albumItems = new ObservableCollection<MainBarAlbum>();
        public ObservableCollection<MainBarAlbum> AlbumItems
        {
            get { return _albumItems; }
        }

        private readonly ObservableCollection<MainBarVideo> _videoItems = new ObservableCollection<MainBarVideo>();
        public ObservableCollection<MainBarVideo> VideoItems
        {
            get { return _videoItems; }
        }

        private readonly ObservableCollection<MainBarDoc> _docItems = new ObservableCollection<MainBarDoc>();
        public ObservableCollection<MainBarDoc> DocItems
        {
            get { return _docItems; }
        }

        private readonly ObservableCollection<IMainBarItem> _scatterViewItems = new ObservableCollection<IMainBarItem>();
        public ObservableCollection<IMainBarItem> ScatterViewItems
        {
            get { return _scatterViewItems; }
        }

        private readonly ObservableCollection<Interviewee> _interviewees = new ObservableCollection<Interviewee>();
        public ObservableCollection<Interviewee> Interviewees
        {
            get { return _interviewees; }
        }

        private readonly Dictionary<int, Interviewee> _intervieweeMap = new Dictionary<int, Interviewee>();

        private MainBarAlbum _currShowingImageItem;
        public MainBarAlbum CurrShowingImageItem
        {
            get { return _currShowingImageItem; }
            set
            {
                if (_currShowingImageItem != value)
                {
                    _currShowingImageItem = value;
                    NotifyOfPropertyChange(()=> CurrShowingImageItem);
                }
            }
        }

        private MainBarVideo _currShowingVideoItem;
        public MainBarVideo CurrShowingVideoItem
        {
            get { return _currShowingVideoItem; }
            set
            {
                if (_currShowingVideoItem != value)
                {
                    _currShowingVideoItem = value;
                    NotifyOfPropertyChange(() => CurrShowingVideoItem);
                }
            }
        }

        private MainBarDoc _currShowingDocItem;
        public MainBarDoc CurrShowingDocItem
        {
            get { return _currShowingDocItem; }
            set
            {
                if (_currShowingDocItem != value)
                {
                    _currShowingDocItem = value;
                    NotifyOfPropertyChange(() => CurrShowingDocItem);
                }
            }
        }

        public Interviewee GetInterviewee(int tagValue)
        {
            return _intervieweeMap[tagValue];
        }

        private string _testLabel;
        public string TestLabel
        {
            get { return _testLabel; }
            set
            {
                if(_testLabel != value)
                {
                    _testLabel = value;
                    NotifyOfPropertyChange(() => TestLabel);
                }
            }
        }

        /**
         * All sample datas are generated here
         */
        public ShellViewModel()
        {
            TestLabel = "Citi Surface Beta version 0.2";
            // Generate Dummy Main Bar Item
            // Generate Images
            var tmp = new MainBarAlbum("Vikram_Pandit", "Sample Image: Vikram_Pandit", "temps/video_still1.jpg");
            tmp.AddImage("temps/Vikram_Pandit.jpg");
			tmp.AddImage("temps/VP_hearing.jpg");
			tmp.AddImage("temps/Fortune_VP.jpg");
            _albumItems.Add(tmp);
           
            tmp = new MainBarAlbum("Citi Global", "Sample Image: Citi Global", "temps/citi_global_1.jpg");
            tmp.AddImage("temps/citi_global_2.jpg");
            tmp.AddImage("temps/citi_global_3.jpg");
            tmp.AddImage("temps/citi_global_4.jpg");
            tmp.AddImage("temps/citi_global_5.jpg");
            _albumItems.Add(tmp);

            tmp = new MainBarAlbum("Citi_story", "Sample Image: Citi Story", "temps/citi_story_1.jpg");
            tmp.AddImage("temps/citi_story_2.jpg");
            tmp.AddImage("temps/citi_story_3.jpg");
            _albumItems.Add(tmp);

            // Generate Videos
            _videoItems.Add(new MainBarVideo("Citi Recruitment", "Sample Video: chris", "temps/citi_recruitment_chris_640kbps_ss.png", "temps/citi_recruitment_chris_640kbps.m4v"));
            _videoItems.Add(new MainBarVideo("Citi Recruitment", "Sample Video: laura", "temps/citi_recruitment_laura_640kbps_ss.png", "temps/citi_recruitment_laura_640kbps.m4v"));
            _videoItems.Add(new MainBarVideo("Citi Recruitment", "Sample Video: kendall", "temps/citi_recruitment_kendall_640kbps_ss.png", "temps/citi_recruitment_kendall_640kbps.m4v"));
            _videoItems.Add(new MainBarVideo("Citi Recruitment", "Sample Video: chris", "temps/citi_recruitment_eunji_640kbps_ss.png", "temps/citi_recruitment_eunji_640kbps.m4v"));

            // Generate Documents
            var doc =
                new MainBarDoc(
                    "2010 Annual Reports & Proxy Statements",
                    "temps/citi_ar2010.jpg")
                    {
                        Content =
                            "Citi works tirelessly to serve individuals, communities, institutions and nations. With 200 years "+
                            "of experience meeting the world’s toughest challenges and seizing its greatest opportunities, "+
                            "we strive to create the best outcomes for our clients and customers with financial solutions that"+ 
                            "are simple, creative and responsible. An institution connecting over 1,000 cities, 160 countries "+
                            "and millions of people, we are your global bank; we are Citi.\n\n" +
                            "The four key principles — the values that guide us as we perform this mission — are:\n"+
                            "Common Purpose: One team, with one goal: serving our clients and stakeholders.\n"+
                            "Responsible Finance: Conduct that is transparent, prudent and dependable.\n"+
                            "Ingenuity: Enhancing our clients’ lives through innovation that harnesses the breadth and depth of our "+
                            "information, global network and world-class products.\n"+
                            "Leadership: Talented people with the best training who thrive in a diverse meritocracy that demands "+
                            "excellence, initiative and courage."
                    };
            _docItems.Add(doc);
            doc = doc.Clone() as MainBarDoc;
            doc.ScreenshotSource = "temps/olympics.jpg";
            doc.Name =
                "Citi Celebrates Sponsorship of 2012 U.S. Olympic & Paralympic Teams With Flag-Raising Event to Mark \"Year-Out\" Milestone";
            doc.Content = "New York – To mark the year-out milestone to the London 2012 Olympic Games, Citi, an official sponsor of the 2012 U.S. Olympic and Paralympic Teams and the U.S. Olympic Committee, held a ceremonial Citi Team USA flag-raising event outside the Citibank Financial Center at its headquarters in New York City. Olympic silver medalist Alicia Sacramone (gymnastics), Olympic gold medalist Susan Francia (rowing), and two-time Paralympic gold medalist Jeremy Campbell (discus, pentathlon) joined Citi CEO Vikram Pandit and employees to kick off the one-year countdown.\n\n"+
                            "\"Observing this important milestone on the Olympic calendar with inspiring athletes was a great way to celebrate our sponsorship of Team USA,\" said Citi CEO Vikram Pandit. \"Helping America's athletes fulfill their Olympic dreams is one way to demonstrate our support for the athletes and our country, reinforcing the commitment to excellence we share. In 2012, our 200th anniversary, we will be proud to stand with our nation's Olympians and Paralympians as they bring the best of the American spirit to London.\"\n\n"+
                            "At the event, the athletes spoke to employees about their experiences at the Beijing 2008 Olympic and Paralympic Games and shared their journeys as Olympic and Paralympic hopefuls as they compete to represent the U.S. at the London 2012 Olympic and Paralympic Games.\n\n"+
                            "As America's global bank for nearly 200 years, Citi's mission of helping individuals, businesses, institutions and nations succeed in the global marketplace complements the USOC's mission of supporting U.S. Olympic and Paralympic athletes in achieving sustained competitive excellence and thereby inspiring all Americans.\n\n" +
                            "Citi is the official bank sponsor of the 2012 U.S. Olympic and Paralympic Teams and the U.S. Olympic Committee.";
            _docItems.Add(doc);

            // Generate Interviewer
            var sampleInterviewer = new Interviewer
                                        {
                                            FirstName = "Vikram",
                                            LastName = "Pandit",
                                            School = "Columbia University",
                                            Email = "vp03006@imcnam.ssmb.com",
                                            Department = "CAI EXECUTIVE SUPPORT",
                                            ProfilePic = "temps/Vikram_Pandit.jpg",
                                            Profile =
                                                "Vikram Pandit was born in Nagpur, India to an affluent Marathi family. " +
                                                "His father, S B Pandit was an executive director at Sarabhai Chemicals in Baroda. " +
                                                "He completed his schooling at the Dadar Parsee Youths Assembly High School in Dadar, Mumbai. " +
                                                "He moved to the United States when he was 16 years old, to study at Gannon University and received a B.S. and M.S. in electrical engineering from Columbia University " +
                                                "in 1976 and 1977 respectively and an M.B.A in 1980 followed by a Ph.D. in Finance from Columbia Business School in 1986. " +
                                                "His Thesis was entitled \"Asset prices in a heterogeneous consumer economy\". He is a trustee at Columbia University.",
                                        };

            var sampleInterviewer2 = new Interviewer
                                        {
                                            FirstName = "Don",
                                            LastName = "Callahan",
                                            School = "Oxford University",
                                            Email = "dc60195@imcnam.ssmb.com",
                                            Department = "Office of CEO(USA)",
                                            ProfilePic = "temps/Callahan_Don.png",
                                            Profile =
                                                "Don Callahan is the Chief Administrative Officer and Chief Operations & Technology Officer for Citi. Mr. Callahan also oversees " +
                                                "Corporate Branding and Shared Services. He joined Citi in October 2007. Prior to joining Citi, Mr. Callahan was a Managing Director " +
                                                "and Head of Marketing Strategy for the Investment Banking Division at Credit Suisse. He was a member of the Investment Banking " +
                                                "Management Committee, the Investment Banking Management Council, and the Chairman's Board. From 1993 to 2006, " +
                                                "Mr. Callahan worked at Morgan Stanley, where he initially served in numerous roles in strategy, business development, " +
                                                "and client technology in the Equities Division. Mr. Callahan received a B.A. in history from Manhattanville College and, as a post-graduate, attended" +
                                                " Oxford University, where he read history."
                                        };

            var sampleInterviewer3 = new Interviewer
                                        {
                                            FirstName = "Jon",
                                            LastName = "Beyman",
                                            School = "Cornell University",
                                            Email = "jb47258@imcnam.ssmb.com",
                                            Department = "CAO MGMT",
                                            ProfilePic = "temps/Beyman_Jon.png",
                                            Profile =
                                                "Jon Beyman, joined Citigroup as global head of operations and technology for its institutional clients group just as " +
                                                "the financial crisis was at its peak. He led the 30,000 technology and operations staff in his group through " +
                                                "turbulent times and is now poised to expand the department, investing 5% more in IT and IT services this year versus " +
                                                "last year. He has an accounting degree from the University of Connecticut, class of 1976, and an MBA in finance from " +
                                                "Cornell University, class of 1981. He started his career as an auditor at accounting firm Arthur Young (now Ernst & " +
                                                "Young). From accounting he went on to work at Chemical Bank, Lehman Brothers, Credit Suisse and others, often in " +
                                                "chief information officer roles. He has spent his entire career in New York."
                                        };

            var sampleInterviewer4 = new Interviewer
                                        {
                                            FirstName = "Gary",
                                            LastName = "Hoberman",
                                            School = "New York University",
                                            Email = "gh32498@imcnam.ssmb.com",
                                            Department = "Chief Technology Office",
                                            ProfilePic = "temps/Gary.png",
                                            Profile =
                                                "Gary is currently Head for Solutions Development, a team of innovative solution providers supporting Citi." +
                                                " Gary graduated the Stern School of Business at New York University with a double major in MIS and " +
                                                "Marketing. Soon after graduation, he began teaching Advanced Programming at NYU for an additional 21 semesters." +
                                                "With the established following, Gary then proceeded to teach a course in building Web based Trading development " +
                                                "for several more semesters. Prior to joining Smith Barney in 1996, Gary was a Sr. Programmer/Analyst at Bankers " +
                                                "Trust where he invented a system that processed every single transaction in their private bank, including trades." +
                                                " Before Bankers Trust, Gary was a consultant at Comtex for the NYFX, CBS Radio Broadcasting, and was singled out " +
                                                "in an awards ceremony as Rookie of the Year."
                                        };

            var sampleInterviewer5 = new Interviewer
                                        {
                                            FirstName = "Urvi",
                                            LastName = "Sanghvi",
                                            School = "Stony Brook University",
                                            Email = "us78960@imcnam.ssmb.com",
                                            Department = "Innovative Solutions",
                                            ProfilePic = "temps/Urvi.png",
                                            Profile =
                                                "Not Available",
                                        };

            var sampleInterviewer6 = new Interviewer
                                        {
                                            FirstName = "Ramit",
                                            LastName = "Luthra",
                                            School = "Punjab Engineering College",
                                            Email = "rl69558@imcnam.ssmb.com",
                                            Department = "Enterprise Infrastructure Sol.",
                                            ProfilePic = "temps/Ramit.png",
                                            Profile =
                                                "Not Available"
                                        };

            var sampleInterviewer7 = new Interviewer
                                        {
                                            FirstName = "Vaidyanath",
                                            LastName = "Sethuramen",
                                            School = "Sindhi College,Madras University",
                                            Email = "vs06247@imcap.ap.ssmb.com",
                                            Department = "Solutions Development",
                                            ProfilePic = "temps/Vaidya.png",
                                            Profile =
                                                "Working for CATE Solutions."
                                        };

            var sampleInterviewer8 = new Interviewer
                                        {
                                            FirstName = "Lestan",
                                            LastName = "D'Souza",
                                            School = "",
                                            Email = "ld02708@imcnam.ssmb.com",
                                            Department = "Business Unit",
                                            ProfilePic = "temps/Lestan.png",
                                            Profile =
                                                "I currently work in CATE Solutions Development and lead a team of very talented individuals making up the Innovative " +
                                                "Solutions team. I've been with Citi forÂ almost 10 years starting at Smith Barney as a lowly developer. Since then " +
                                                "I have moved around to CMB and GWM technology and am now firmly in CATE. I've played many roles at Citi including " +
                                                "developer, architect now as an uber manager :) One of my many claims to fame is a system that I masterminded - " +
                                                "Grand Central. Grand Central is patented by Citi of which I am a co-owner. My team also works on solving operational" +
                                                " issues in O&T, the various sectors and regions and the corporate functions. I'm known for my creative solutions, " +
                                                "thinking outside the box and being able to pull people together to do great things. I was one of the founding members" +
                                                " of the 2.0 movement and lead the delivery of the technology solution."
                                        };

            var sampleInterviewer9 = new Interviewer
                                        {
                                            FirstName = "Barb",
                                            LastName = "Overgaard",
                                            School = "",
                                            Email = "bo58366@imcnam.ssmb.com",
                                            Department = "L&PSG Business Trainin MgrTBD1",
                                            ProfilePic = "temps/Barb.png",
                                            Profile =
                                                "I started with Citi (Sears) in March 1989. I have occupied several different positions with our company but found that being " +
                                                "a trainer is a great fit for me. I have been in this position since 1993 and truly love what I do. My boyfriend and" +
                                                " I have been together 15 years. We have a lovable Australian Shepherd that greets us at the door when we get home." +
                                                " Together we have 3 sons, 2 grandsons and 2 granddaughters. When we are not with them, we love to spend time in the " +
                                                "wonderful mountains of Idaho."
                                        };

            var sampleInterviewer10 = new Interviewer
                                        {
                                            FirstName = "Everett",
                                            LastName = "Johnson",
                                            School = "",
                                            Email = "ej57662@imcnam.ssmb.com",
                                            Department = "L&PSG Business Trainin MgrTBD1",
                                            ProfilePic = "temps/Everett_Johnson.png",
                                            Profile =
                                                "I am Everett Johnson and I reside in Boise, Idaho working at the Meridian site. I have been employed with CITI since October 7, 2002." +
                                                " I started on the phones as a customer service representative, moved to Unit Manager after six months, and then became a Business Trainer " +
                                                " Prior to my employment with CITI, I spent 13 years in the Army as an officer primarily in training positions. I am married and have 2 daughters."
                                        };
            
            // Generate Interviewee
            var yinLi = new Interviewee(1)
                            {
                                FirstName = "Yin",
                                LastName = "Li"
                            };

            var leiHan = new Interviewee(2)
                             {
                                 FirstName = "Lei",
                                 LastName = "Han"
                            };

            var hillaryYang = new Interviewee(3)
                            {
                                FirstName = "Hillary",
                                LastName = "Yang"
                            };

            //Generate Interview
            var interview1 = new Interview
                                {
                                    Interviewee = yinLi,
                                    Interviewer = sampleInterviewer,
                                    StartTime = new DateTime(2012,12,21,12,00,00),
                                    Memo = "The Chief Financial Officer (CFO) supports the institution's mission by managing Treasury, " +
                                           "Financial Management, Accounting and Information Services functions.As a member of senior management, " +
                                           "the CFO participates in setting broad organizational goals, objectives and policies, " +
                                           "particularly in the area of fiscal affairs.Tasks include supporting project management " +
                                           "and land acquisition activities, managing accounting, financial reporting activities, " +
                                           "and supervising Board relations for the Finance, Audit and Investment Policy Committees."
                                };
            interview1.EndTime = interview1.StartTime.AddHours(1);

            var interview2 = new Interview
                                {
                                    Interviewee = yinLi,
                                    Interviewer = sampleInterviewer2,
                                    StartTime = new DateTime(2012, 12, 21, 12, 00, 00),
                                    Memo = "The Chief Financial Officer (CFO) supports the institution's mission by managing Treasury, " +
                                           "Financial Management, Accounting and Information Services functions.As a member of senior management, " +
                                           "the CFO participates in setting broad organizational goals, objectives and policies, " +
                                           "particularly in the area of fiscal affairs.Tasks include supporting project management " +
                                           "and land acquisition activities, managing accounting, financial reporting activities, " +
                                           "and supervising Board relations for the Finance, Audit and Investment Policy Committees."
                                };
            interview2.EndTime = interview2.StartTime.AddHours(1);

            var interview3 = new Interview
                                {
                                    Interviewee = yinLi,
                                    Interviewer = sampleInterviewer3,
                                    StartTime = new DateTime(2012, 12, 21, 12, 00, 00),
                                    Memo = "The Chief Financial Officer (CFO) supports the institution's mission by managing Treasury, " +
                                           "Financial Management, Accounting and Information Services functions.As a member of senior management, " +
                                           "the CFO participates in setting broad organizational goals, objectives and policies, " +
                                           "particularly in the area of fiscal affairs.Tasks include supporting project management " +
                                           "and land acquisition activities, managing accounting, financial reporting activities, " +
                                           "and supervising Board relations for the Finance, Audit and Investment Policy Committees."
                                };
            interview3.EndTime = interview3.StartTime.AddHours(1);


            var interview4 = new Interview
                                {
                                    Interviewee = leiHan,
                                    Interviewer = sampleInterviewer4,
                                    StartTime = new DateTime(2012,12,21,13,00,00),
                                    Memo = "The Development Data Analyst will collaborate with Development Services staff to design " +
                                           "and maintain a data warehouse; design and implement operational reports to track actual progress " +
                                           "of fundraising programs toward campaign and fiscal year goals; develop and validate statistical " +
                                           "models for forecasting the fiscal year and campaign progress using historical trend data " +
                                           "and information from industry peers."
                                };
            interview4.EndTime = interview4.StartTime.AddHours(1);

            var interview5 = new Interview
                                {
                                    Interviewee = leiHan,
                                    Interviewer = sampleInterviewer5,
                                    StartTime = new DateTime(2012, 12, 21, 14, 00, 00),
                                };
            interview5.EndTime = interview5.StartTime.AddHours(1);

            var interview6 = new Interview
                                {
                                    Interviewee = leiHan,
                                    Interviewer = sampleInterviewer6,
                                    StartTime = new DateTime(2012, 12, 21, 15, 00, 00),
                                };
            interview6.EndTime = interview6.StartTime.AddHours(1);

            var interview7 = new Interview
                                {
                                    Interviewee = leiHan,
                                    Interviewer = sampleInterviewer7,
                                    StartTime = new DateTime(2012, 12, 21, 16, 00, 00),
                                };
            interview7.EndTime = interview7.StartTime.AddHours(1);

            var interview8 = new Interview
                                {
                                    Interviewee = hillaryYang,
                                    Interviewer = sampleInterviewer8,
                                    StartTime = new DateTime(2012, 12, 21, 13, 00, 00),
                                };
            interview8.EndTime = interview8.StartTime.AddHours(1);

            var interview9 = new Interview
                                {
                                    Interviewee = hillaryYang,
                                    Interviewer = sampleInterviewer9,
                                    StartTime = new DateTime(2012, 12, 21, 14, 00, 00),
                                };
            interview9.EndTime = interview9.StartTime.AddHours(1);

            var interview10 = new Interview
                                {
                                    Interviewee = hillaryYang,
                                    Interviewer = sampleInterviewer10,
                                    StartTime = new DateTime(2012, 12, 21, 15, 00, 00),
                                };
            interview10.EndTime = interview10.StartTime.AddHours(1);

            yinLi.Interviews.Add(interview1);
            yinLi.Interviews.Add(interview2);
            yinLi.Interviews.Add(interview3);
            leiHan.Interviews.Add(interview4);
            leiHan.Interviews.Add(interview5);
            leiHan.Interviews.Add(interview6);
            leiHan.Interviews.Add(interview7);
            hillaryYang.Interviews.Add(interview8);
            hillaryYang.Interviews.Add(interview9);
            hillaryYang.Interviews.Add(interview10);

            //generate role

            var sampleRole = new Role { Description = "Sample Role!" };
            sampleRole.Interviewees.Add(yinLi);
            sampleRole.Interviewees.Add(leiHan);
            sampleRole.Interviewees.Add(hillaryYang);
            yinLi.InterviewRole = sampleRole;
            leiHan.InterviewRole = sampleRole;
            hillaryYang.InterviewRole = sampleRole;

            _interviewees.Add(yinLi);
            _interviewees.Add(leiHan);
            _interviewees.Add(hillaryYang);
            _intervieweeMap.Add(1, yinLi);//add to Map for future retrieve purpose
            _intervieweeMap.Add(2, leiHan);
            _intervieweeMap.Add(3, hillaryYang);
        }
    }
}

